package service;

import java.util.Date;

public class AuctionEvent extends Event {
	
	protected int auctionId;
	
	public AuctionEvent(String type, int id) {
		super(type);
		this.auctionId=id;
	}

	public int getAuctionId() {
		return auctionId;
	}

	public String toString() {
		String string = this.type+": "+dateFormat.format(this.timestamp) + " - ";
		if(this.type.equals("AUCTION_STARTED")) string += "auction started with id ";
		if(this.type.equals("AUCTION_ENDED")) string += "auction ended with id ";
		
		string += this.auctionId;
		
		return string;
	}
}
